package org.wak.scene
{
	import flash.geom.Point;
	
	/**
	 * Class to hold location data of a character on a Scene
	 * when this is initialized. This is not a CharacterDefinition.
	 * Is just a Character's location description on the scene. 
	 * 
	 */	
	public class SceneCharData
	{
		private var mCharacterId:String = "";
		private var mSceneX:Number = 0 ;
		private var mSceneY:Number = 0 ;
		private var mBehaviour:String = "" ;
		private var mInteractionPoint:Point = null ;
		
		private var mInteractionPointBehaviour:String = "" ;
		
		public function SceneCharData(pCharXML:XML = null)
		{
			if(pCharXML != null)
			{
				mCharacterId = pCharXML.CharId ;
				mSceneX = pCharXML.@x ;
				mSceneY = pCharXML.@y ;
				mBehaviour = pCharXML.@behaviour ;
				
				mInteractionPoint = new Point() ;
				mInteractionPoint.x = Number(pCharXML.InteractionPoint.IntPoint[0].@x) ;
				mInteractionPoint.y = Number(pCharXML.InteractionPoint.IntPoint[0].@y) ;
				mInteractionPointBehaviour = pCharXML.InteractionPoint.behaviour ;
			}
		}
		
		/**
		 * Character id. 
		 * @return 
		 * 
		 */		
		public function get characterId():String
		{
			return mCharacterId ;
		}
		
		
		public function set characterId(value:String):void
		{
			mCharacterId = value;
		}
		
		/**
		 * Character's horizontal coordinate on the scene. 
		 * @return 
		 * 
		 */		
		public function get sceneX():Number
		{
			return mSceneX ;
		}
		
		
		public function set sceneX(value:Number):void
		{
			mSceneX = value;
		}
		
		/**
		 * Character's vertical coordinate on the scene. 
		 * @return 
		 * 
		 */	
		public function get sceneY():Number
		{
			return mSceneY ;
		}
		
		public function set sceneY(value:Number):void
		{
			mSceneY = value;
		}
		
		/**
		 * Startin Anim Behaviour. 
		 * @return 
		 * 
		 */		
		public function get behaviour():String
		{
			return mBehaviour ;
		}
		
		
		public function set behaviour(value:String):void
		{
			mBehaviour = value;
		}
		
		/**
		 * Interaction point on the scene. 
		 * @param value new interaction point x.
		 * 
		 */		
		public function set interactionPointX(value:Number):void
		{
			mInteractionPoint.x = value;
		}
		
		public function get interactionPointX():Number
		{
			return mInteractionPoint.x ;
		}
		
		/**
		 * Interaction point on the scene. 
		 * @param value new interaction point y.
		 * 
		 */		
		public function set interactionPointY(value:Number):void
		{
			mInteractionPoint.y = value;
		}
		
		public function get interactionPointY():Number
		{
			return mInteractionPoint.y ;
		}
		
		public function set interactionBehaviour(value:String):void
		{
			mInteractionPointBehaviour = value;
		}
		
		public function get interactionBehaviour():String 
		{
			return mInteractionPointBehaviour ;
		}
		
		
		

	}
}